package com.algorithm;

/**
 * 项目名称: java_algorithm
 * @ClassName MaoPaoPaiXu
 * @Description
 * @Author huipanxing huipanxing@chinasofti.com   @Date 2021/10/18 15:20
 */
public class MaoPaoPaiXu {


    public static void main(String[] args) {
        int [] nums={3,6,2,5,0,4};
        System.out.println(sort(nums));
    }

    public static int [] sort(int [] nums){
        for (int i = 0; i < nums.length; i++) {
            for (int j = i+1; j < nums.length; j++) {
                if (nums[i]>nums[j]){
                    int temp=nums[i];
                    nums[i]=nums[j];
                    nums[j]=temp;
                }
            }
        }
        return nums;
    }
}
